Add a patch to fix FTBFS in non-English locales
authorSimon McVittie <smcv@debian.org>
Tue, 19 Sep 2017 13:42:56 +0000 (14:42 +0100)
committerSimon McVittie <smcv@debian.org>
Tue, 19 Sep 2017 23:55:32 +0000 (00:55 +0100)
debian/changelog
debian/patches/2017.12/tests-Explicitly-unset-LANGUAGE-after-setting-LC_ALL.patch [new file with mode: 0644]
debian/patches/series

index 875618b9b1060cef8d963d637d52ff079c48544a..b89bb87fc61a82bf753f313cbff3de85a2850e7e 100644 (file)
@@ -2,6 +2,7 @@ ostree (2017.11-2) UNRELEASED; urgency=medium
 
   * Replace patch with the version applied upstream in 2017.12
   * Standards-Version: 4.1.0 (no changes)
+  * Add a patch to fix FTBFS in non-English locales
 
  -- Simon McVittie <smcv@debian.org>  Tue, 19 Sep 2017 10:37:12 +0100
 
diff --git a/debian/patches/2017.12/tests-Explicitly-unset-LANGUAGE-after-setting-LC_ALL.patch b/debian/patches/2017.12/tests-Explicitly-unset-LANGUAGE-after-setting-LC_ALL.patch
new file mode 100644 (file)
index 0000000..f540eef
--- /dev/null
@@ -0,0 +1,31 @@
+From: Simon McVittie <smcv@collabora.com>
+Date: Tue, 19 Sep 2017 14:41:18 +0100
+Subject: tests: Explicitly unset LANGUAGE after setting LC_ALL
+
+As a GNU extension, LANGUAGE takes precedence over LC_ALL for
+gettext(3) whenever the locale is not C, causing tests that grep for
+specific English strings to fail when run in non-English locales.
+The upstream glibc proposal for C.UTF-8 would give C.UTF-8 the same
+special case as C here, but the implementation in Debian does not
+currently have this, so we have to unset LANGUAGE too.
+
+Signed-off-by: Simon McVittie <smcv@collabora.com>
+Forwarded: https://github.com/ostreedev/ostree/pull/1188
+Applied-upstream: 2017.12, commit:223c940b46a4bb335665df7436566b73cdf0effd
+---
+ tests/libtest-core.sh | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/tests/libtest-core.sh b/tests/libtest-core.sh
+index d0b7d37..ce0e4bb 100644
+--- a/tests/libtest-core.sh
++++ b/tests/libtest-core.sh
+@@ -40,6 +40,8 @@ if locale -a | grep C.UTF-8 >/dev/null; then
+ else
+     export LC_ALL=C
+ fi
++# A GNU extension, used whenever LC_ALL is not C
++unset LANGUAGE
+ # This should really be the default IMO
+ export G_DEBUG=fatal-warnings
index 83f098ba0ebd59d3a6738aba2b99f01a0ba9253b..58db0ab7aa4ee6ceb5e25972ed3161895ee1cb70 100644 (file)
@@ -1 +1,2 @@
 2017.12/tests-Fix-JavaScript-tests-with-gjs-1.50.0.patch
+2017.12/tests-Explicitly-unset-LANGUAGE-after-setting-LC_ALL.patch